# coding=utf-8
"""
Author: Mr.夏末
@Function: 功能名称
"""

# 类
class Dog:
    """狗是什么样的"""
    def __int__(self):
        print("__int__不是构造函数")

    def  __init__(self,**kwargs):
        """
        构造函数：用来创建对象
        :param kwargs:
        """
        # 品种
        self.type = kwargs.get('type')
        # 年龄
        self.age = kwargs.get('age')
        # 腿
        self.legs= kwargs.get('legs')
        # 眼
        self.eyes = kwargs.get('eyes')
        # 颜色
        self.colour = kwargs.get('colour')
        # 肉
        self.flesh = kwargs.get('flesh')
        # 重量
        self.weight = kwargs.get('weight')

    def bark(self):
        """狗的叫声"""
        print("汪汪汪")

    def eat(self,bite=''):
        if bite:
            print(bite)
        else:
            print("啃骨头")

    def disassembly(self):
        print("拆家")

if __name__ == '__main__':
    print(Dog.__doc__)
    # 创建对象
    dog1 = Dog(age=0,legs=4,eyes=2,colour='白色',type="中华田园犬",weight='1kg',flesh='小狗肉')
    print(dog1.bark.__doc__)
    dog1.__int__()
    dog1.eat("狗咬人了")
    dog2 = Dog(age=0, legs=4, eyes=2, colour='黑色', type="中华田园犬", weight='1kg', flesh='小狗肉')
    dog3 = Dog(age=0, legs=4, eyes=2, colour='白色', type="哈士奇", weight='1kg', flesh='小狗肉')